<template>
  <star-horse-dialog :visible = "batchDialogTableVisible" :title = "dialogTitle" is-batch = "true" @merge = "merge"
                     @mergeDraft = "mergeDraft"
                     @reset = "resetForm">

    <el-table
        :data = "batchDataList"
        :row-class-name = "rowClassName"
        @selection-change = "handleDetailSelectionChange"
        border
        fit = "true"
        ref = "tb"
        v-loading = "loading"
    >
      <el-table-column align = "center" type = "selection" width = "30" fixed = "left"/>
      <el-table-column align = "center" label = "序号" prop = "xh" width = "50"></el-table-column>
      <el-table-column
          :formatter = "dataFormat"
          :show-overflow-tooltip = "true"
          label = "主键"
          min-width = "200px"
          prop = "idRolesinfo"
          required
          sortable v-if = " false ">
        <template #default = "scope">
          <el-input-number clearable placeholder = "请输入主键"
                           v-model = "batchDataList[scope.row.xh-1].idRolesinfo"/>
        </template>
      </el-table-column>
      <el-table-column
          :formatter = "dataFormat"
          :show-overflow-tooltip = "true"
          label = "主键"
          min-width = "200px"
          prop = "idDepartment"
          required
          sortable v-if = "true ">
        <template #default = "scope">
          <el-input-number clearable placeholder = "请输入主键"
                           v-model = "batchDataList[scope.row.xh-1].idDepartment"/>
        </template>
      </el-table-column>
      <el-table-column
          :formatter = "dataFormat"
          :show-overflow-tooltip = "true"
          label = "角色名称"
          min-width = "200px"
          prop = "roleName"
          required
          sortable v-if = "true ">
        <template #default = "scope">
          <el-input clearable placeholder = "请输入角色名称"
                    v-model = "batchDataList[scope.row.xh-1].roleName"></el-input>
        </template>
      </el-table-column>
      <el-table-column
          :formatter = "dataFormat"
          :show-overflow-tooltip = "true"
          label = "角色编码"
          min-width = "200px"
          prop = "roleCode"
          required
          sortable v-if = "true ">
        <template #default = "scope">
          <el-input clearable placeholder = "请输入角色编码"
                    v-model = "batchDataList[scope.row.xh-1].roleCode"></el-input>
        </template>
      </el-table-column>
      <el-table-column
          :formatter = "dataFormat"
          :show-overflow-tooltip = "true"
          label = "角色描述"
          min-width = "200px"
          prop = "roleDesc"
          required
          sortable v-if = "true ">
        <template #default = "scope">
          <el-input clearable placeholder = "请输入角色描述"
                    v-model = "batchDataList[scope.row.xh-1].roleDesc"></el-input>
        </template>
      </el-table-column>
      <el-table-column
          :formatter = "dataFormat"
          :show-overflow-tooltip = "true"
          label = "修改人"
          min-width = "200px"
          prop = "updatedBy"
          sortable
          v-if = " false ">
        <template #default = "scope">
          <el-input clearable placeholder = "请输入修改人"
                    v-model = "batchDataList[scope.row.xh-1].updatedBy"></el-input>
        </template>
      </el-table-column>
      <el-table-column
          :formatter = "dataFormat"
          :show-overflow-tooltip = "true"
          label = "修改日期"
          min-width = "200px"
          prop = "updatedDate"
          sortable
          v-if = " false ">
        <template #default = "scope">
          <el-date-picker clearable placeholder = "请选择修改日期"
                          type = "date"
                          v-model = "batchDataList[scope.row.xh-1].updatedDate">
          </el-date-picker>
        </template>
      </el-table-column>
      <el-table-column
          :formatter = "dataFormat"
          :show-overflow-tooltip = "true"
          label = "创建人"
          min-width = "200px"
          prop = "createdBy"
          sortable
          v-if = " false ">
        <template #default = "scope">
          <el-input clearable placeholder = "请输入创建人"
                    v-model = "batchDataList[scope.row.xh-1].createdBy"></el-input>
        </template>
      </el-table-column>
      <el-table-column
          :formatter = "dataFormat"
          :show-overflow-tooltip = "true"
          label = "创建日期"
          min-width = "200px"
          prop = "createdDate"
          sortable
          v-if = " false ">
        <template #default = "scope">
          <el-date-picker clearable placeholder = "请选择创建日期"
                          type = "date"
                          v-model = "batchDataList[scope.row.xh-1].createdDate">
          </el-date-picker>
        </template>
      </el-table-column>
      <el-table-column
          :formatter = "dataFormat"
          :show-overflow-tooltip = "true"
          label = "是否删除 1 是 0否"
          min-width = "200px"
          prop = "isDel"
          sortable
          v-if = " false ">
        <template #default = "scope">
          <el-input-number clearable placeholder = "请输入是否删除 1 是 0否"
                           v-model = "batchDataList[scope.row.xh-1].isDel"/>
        </template>
      </el-table-column>
      <el-table-column
          :formatter = "dataFormat"
          :show-overflow-tooltip = "true"
          label = "状态名称"
          min-width = "200px"
          prop = "statusName"
          sortable
          v-if = " false ">
        <template #default = "scope">
          <el-input clearable placeholder = "请输入状态名称"
                    v-model = "batchDataList[scope.row.xh-1].statusName"></el-input>
        </template>
      </el-table-column>
      <el-table-column
          :formatter = "dataFormat"
          :show-overflow-tooltip = "true"
          label = "状态编码"
          min-width = "200px"
          prop = "statusCode"
          required
          sortable v-if = "true ">
        <template #default = "scope">
          <el-input clearable placeholder = "请输入状态编码"
                    v-model = "batchDataList[scope.row.xh-1].statusCode"></el-input>
        </template>
      </el-table-column>
      <el-table-column
          :formatter = "dataFormat"
          :show-overflow-tooltip = "true"
          label = "系统编号"
          min-width = "200px"
          prop = "dataNo"
          sortable
          v-if = " false ">
        <template #default = "scope">
          <el-input clearable placeholder = "请输入系统编号"
                    v-model = "batchDataList[scope.row.xh-1].dataNo"></el-input>
        </template>
      </el-table-column>
      <el-table-column fixed = "right" label = "操作" min-width = "150px">
        <template #header = "scope">
          <span>操作</span>&nbsp;&nbsp;
          <el-button @click = "handleAddDetails(scope.row,1)" link size = "mini" type = "primary">
            <el-tooltip content = "添加一行">
              <user-icon icon = "plus" style = "vertical-align: middle;color:#409EFF;"/>
            </el-tooltip>
          </el-button>
        </template>
        <template #default = "scope">
          <el-button v-if = "scope.row.xh==ruleForm.batchDataList.length" @click = "handleAddDetails(scope.row,1)" link
                     size = "mini" type = "primary">
            <el-tooltip content = "添加一行">添加</el-tooltip>
          </el-button>
          <el-button @click = "handleAddDetails(scope.row,2)" link size = "mini" type = "danger">
            <el-tooltip content = "删除当前行">删除</el-tooltip>
          </el-button>
        </template>
      </el-table-column>
    </el-table>
  </star-horse-dialog>

  <star-horse-dialog :visible = "dialogTableVisible" :title = "dialogTitle" @merge = "merge" @mergeDraft = "mergeDraft"
                     @reset = "resetForm">

    <el-form :model = "ruleForm" :rules = "rules" class = "demo-ruleForm" ref = "ruleForm">
      <el-row>
        <el-col :span = "12">
          <el-form-item label = "所属部门" prop = "departments"
                        required v-if = "!false">
            <el-select clearable
                       collapse-tags
                       filterable
                       multiple
                       placeholder = "请选择所属部门"
                       v-model = "ruleForm.departments">
              <el-option
                  :key = "sitem.idDepartment"
                  :label = "sitem.deptName"
                  :value = "sitem.idDepartment"
                  v-for = "sitem in departList"
              >
              </el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span = "12">
          <el-form-item label = "角色名称" prop = "roleName"
                        required v-if = "!false">
            <el-input clearable placeholder = "请输入角色名称"
                      v-model = "ruleForm.roleName"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span = "12">
          <el-form-item label = "角色编码" prop = "roleCode"
                        required v-if = "!false">
            <el-input clearable placeholder = "请输入角色编码"
                      v-model = "ruleForm.roleCode"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span = "12">
          <el-form-item label = "状态" prop = "statusCode"
                        v-if = "!false">
            <el-select placeholder = "请选择状态" v-model = "ruleForm.statusCode">
              <el-option
                  :key = "sitem.statusCode"
                  :label = "sitem.statusName"
                  :value = "sitem.statusCode"
                  v-for = "sitem in selectData"
              >
              </el-option>
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span = "24">
          <el-form-item label = "系统权限" prop = "appsList"
                        required v-if = "!false">
            <el-select clearable filterable multiple collapse-tags placeholder = "请选择系统"
                       show-checkbox
                       v-model = "ruleForm.appsList">
              <el-option v-for = "item in appList" :value = "item.idInformations" :key = "item.idInformations"
                         :label = "item.sysName"/>

            </el-select>
          </el-form-item>
          <el-form-item label = "菜单权限" prop = "menusList"
                        required v-if = "!false">
            <el-tree-select :data = "menuList" clearable filterable multiple collapse-tags placeholder = "请选择菜单"
                            show-checkbox
                            v-model = "ruleForm.menusList"></el-tree-select>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span = "24">
          <el-form-item label = "角色描述" prop = "roleDesc"
                        v-if = "!false">
            <el-input clearable maxlength = "1000" placeholder = "请输入角色描述" show-word-limit type = "textarea"
                      v-model = "ruleForm.roleDesc"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-form-item label = "主键" prop = "idRolesinfo" v-if = "false">
        <el-input clearable placeholder = "请输入主键"
                  v-model = "ruleForm.idRolesinfo"></el-input>
      </el-form-item>


      <el-form-item label = "修改人" prop = "updatedBy"
                    v-if = "!true">
        <el-input clearable placeholder = "请输入修改人"
                  v-model = "ruleForm.updatedBy"></el-input>
      </el-form-item>

      <el-form-item label = "修改日期" prop = "updatedDate"
                    v-if = "!true">
        <el-date-picker clearable placeholder = "请选择修改日期" type = "date"
                        v-model = "ruleForm.updatedDate">
        </el-date-picker>
      </el-form-item>

      <el-form-item label = "创建人" prop = "createdBy"
                    v-if = "!true">
        <el-input clearable placeholder = "请输入创建人"
                  v-model = "ruleForm.createdBy"></el-input>
      </el-form-item>

      <el-form-item label = "创建日期" prop = "createdDate"
                    v-if = "!true">
        <el-date-picker clearable placeholder = "请选择创建日期" type = "date"
                        v-model = "ruleForm.createdDate">
        </el-date-picker>
      </el-form-item>

      <el-form-item label = "是否删除 1 是 0否" prop = "isDel"
                    v-if = "!true">
        <el-input-number clearable placeholder = "请输入是否删除 1 是 0否"
                         v-model = "ruleForm.isDel"/>
      </el-form-item>

      <el-form-item label = "状态名称" prop = "statusName"
                    v-if = "!true">
        <el-input clearable placeholder = "请输入状态名称"
                  v-model = "ruleForm.statusName"></el-input>
      </el-form-item>


      <el-form-item label = "系统编号" prop = "dataNo"
                    v-if = "!true">
        <el-input clearable placeholder = "请输入系统编号"
                  v-model = "ruleForm.dataNo"></el-input>
      </el-form-item>
    </el-form>
  </star-horse-dialog>
  <star-horse-dialog :visible = "viewVisible" :title = "'查看数据'" :is-view = "true">
    <div class = "item">
      <label>所属部门:</label>
      <div class = "content">{{ formatDepart(ruleForm.departments) }}</div>
    </div>
    <div class = "item">
      <label>角色名称:</label>
      <div class = "content">{{ ruleForm.roleName }}</div>
    </div>
    <div class = "item">
      <label>角色编码:</label>
      <div class = "content">{{ ruleForm.roleCode }}</div>
    </div>
    <div class = "item">
      <label>角色描述:</label>
      <div class = "content">{{ ruleForm.roleDesc }}</div>
    </div>
    <div class = "item">
      <label>状态名称:</label>
      <div class = "content">{{ ruleForm.statusName }}</div>
    </div>
    <div class = "item">
      <label>创建人:</label>
      <div class = "content">{{ ruleForm.createdBy }}</div>
    </div>
    <div class = "item">
      <label>创建日期:</label>
      <div class = "content">{{ createDate(ruleForm.createdDate) }}</div>
    </div>
    <div class = "item">
      <label>系统名称:</label>
      <div class = "content">
        <el-table
            :data = "ruleForm.appsList"
            border
            class = "data_table"
            fit = "true"
            highlight-current-row = "true"
            stripe = "true"
            height = "100%">
          <el-table-column
              :formatter = "dataFormat"
              :show-overflow-tooltip = "true"
              label = "系统名称"
              min-width = "200px"
              prop = "sysName"
              sortable
              v-if = "true ">
          </el-table-column>
          <el-table-column
              :formatter = "dataFormat"
              :show-overflow-tooltip = "true"
              label = "系统描述"
              min-width = "200px"
              prop = "sysDesc"
              sortable
              v-if = "true ">
          </el-table-column>

        </el-table>
      </div>
    </div>
    <div class = "item">
      <label>管理菜单:</label>
      <div class = "content">
        <el-table
            :data = "ruleForm.menusList"
            border
            class = "data_table"
            fit = "true"
            highlight-current-row = "true"
            stripe = "true"
            height = "100%">
          <el-table-column
              :formatter = "dataFormat"
              :show-overflow-tooltip = "true"
              label = "菜单名称"
              min-width = "200px"
              prop = "menuName"
              sortable
              v-if = "true ">
          </el-table-column>
          <el-table-column
              :formatter = "dataFormat"
              :show-overflow-tooltip = "true"
              label = "菜单路径"
              min-width = "200px"
              prop = "menuPath"
              sortable
              v-if = "true ">
          </el-table-column>
          <el-table-column
              :formatter = "dataFormat"
              :show-overflow-tooltip = "true"
              label = "菜单图标"
              min-width = "200px"
              prop = "menuIcon"
              sortable
              v-if = "true ">
          </el-table-column>
          <el-table-column
              :formatter = "dataFormat"
              :show-overflow-tooltip = "true"
              label = "菜单描述"
              min-width = "200px"
              prop = "menuDesc"
              sortable
              v-if = "true ">
          </el-table-column>
        </el-table>
      </div>
    </div>


  </star-horse-dialog>
  <el-card class = "inner_content">
    <el-form class = "search_area" size = "mini">
      <el-form-item label = "角色名称">
        <el-input placeholder = "请输入角色名称" v-model = "searchForm.roleName"/>
      </el-form-item>
      <el-form-item label = "添加时间">
        <el-date-picker
            end-placeholder = "结束日期" placeholder = "请选择添加时间"
            range-separator = "到"
            start-placeholder = "开始日期"
            type = "daterange"
            v-model = "searchForm.createdDate"
        />
      </el-form-item>
      <el-form-item label = "     ">
        <el-button @click = "dataSearch" link type = "primary">
          <user-icon icon = "search" style = "vertical-align: middle;color:#e3e9f2;"/>
          <span style = "vertical-align: middle;"> 查询 </span>
        </el-button>
        <el-button @click = "dataSearch(1)" link small>
          <span style = "vertical-align: middle;"> 重置 </span>
        </el-button>
      </el-form-item>
    </el-form>
    <el-divider/>
    <star-horse-button-list
        :permission = "permission"
        :upload-url = "uploadUrl"
        @upload = "upload"
        @uploadProcess = "uploadProcess"
        @uploadError = "uploadError"
        @uploadSuccess = "uploadProcess"
        @btnOperation = "btnOperation"
    />


    <el-table
        :data = "dataList"
        :row-key = "getRowIdentity"
        @row-dblclick = "editData"
        @selection-change = "handleSelectionChange"
        border
        class = "data_table"
        fit = "true"
        highlight-current-row = "true"
        id = "rolesinfoPo"
        ref = "multipleTable"
        stripe = "true">
      <el-table-column fixed width = "1"/>
      <el-table-column
          :reserve-selection = "true"
          align = "center"
          fixed = "left"
          type = "selection"
      />
      <el-table-column
          :formatter = "dataFormat"
          :show-overflow-tooltip = "true"
          label = "主键"
          min-width = "200px"
          prop = "idRolesinfo"
          sortable
          v-if = " false ">
      </el-table-column>
      <el-table-column
          :formatter = "dataFormat"
          :show-overflow-tooltip = "true"
          label = "部门名称"
          min-width = "200px"
          prop = "departments"
          sortable
          v-if = "true ">
      </el-table-column>
      <el-table-column
          :formatter = "dataFormat"
          :show-overflow-tooltip = "true"
          label = "角色名称"
          min-width = "200px"
          prop = "roleName"
          sortable
          v-if = "true ">
      </el-table-column>
      <el-table-column
          :formatter = "dataFormat"
          :show-overflow-tooltip = "true"
          label = "角色编码"
          min-width = "200px"
          prop = "roleCode"
          sortable
          v-if = "true ">
      </el-table-column>
      <el-table-column
          :formatter = "dataFormat"
          :show-overflow-tooltip = "true"
          label = "角色菜单"
          min-width = "200px"
          prop = "menusList"
          sortable
          v-if = "true ">
      </el-table-column>
      <el-table-column
          :formatter = "dataFormat"
          :show-overflow-tooltip = "true"
          label = "修改人"
          min-width = "200px"
          prop = "updatedBy"
          sortable
          v-if = " false ">
      </el-table-column>
      <el-table-column
          :formatter = "dataFormat"
          :show-overflow-tooltip = "true"
          label = "修改日期"
          min-width = "200px"
          prop = "updatedDate"
          sortable
          v-if = " false ">
      </el-table-column>
      <el-table-column
          :formatter = "dataFormat"
          :show-overflow-tooltip = "true"
          label = "创建人"
          min-width = "200px"
          prop = "createdBy"
          sortable
          v-if = " false ">
      </el-table-column>
      <el-table-column
          :formatter = "dataFormat"
          :show-overflow-tooltip = "true"
          label = "创建日期"
          min-width = "200px"
          prop = "createdDate"
          sortable
          v-if = "true">
      </el-table-column>
      <el-table-column
          :formatter = "dataFormat"
          :show-overflow-tooltip = "true"
          label = "是否删除 1 是 0否"
          min-width = "200px"
          prop = "isDel"
          sortable
          v-if = " false ">
      </el-table-column>
      <el-table-column
          :formatter = "dataFormat"
          :show-overflow-tooltip = "true"
          label = "状态名称"
          min-width = "200px"
          prop = "statusName"
          sortable
          v-if = "true ">
      </el-table-column>
      <el-table-column
          :formatter = "dataFormat"
          :show-overflow-tooltip = "true"
          label = "状态编码"
          min-width = "200px"
          prop = "statusCode"
          sortable
          v-if = " false ">
      </el-table-column>
      <el-table-column
          :formatter = "dataFormat"
          :show-overflow-tooltip = "true"
          label = "系统编号"
          min-width = "200px"
          prop = "dataNo"
          sortable
          v-if = " false ">
      </el-table-column>
      <el-table-column fixed = "right" label = "操作" min-width = "180px">
        <template #default = "scope">
          <el-button v-if = "permission.edit" @click = "editById(scope.row[primaryKey])" link title = ""
                     type = "primary">
            <el-tooltip content = "编辑">编辑</el-tooltip>
          </el-button>
          <el-button v-if = "permission.view" @click = "viewById(scope.row[primaryKey])" link title = ""
                     type = "primary">
            <el-tooltip content = "查看">查看</el-tooltip>
          </el-button>
          <el-button v-if = "permission.delete" @click = "deleteById(scope.row[primaryKey])" link title = ""
                     type = "danger">
            <el-tooltip content = "删除">删除</el-tooltip>
          </el-button>
        </template>
      </el-table-column>
    </el-table>
    <el-divider/>
    <el-pagination
        :total = "totalData"
        @current-change = "pageChangeClick"
        @size-change = "pageSizeClick"
        layout = "total, sizes, prev, pager, next, jumper"
        v-model:currentPage = "currentPage"
        v-model:page-size = "pageSize"
        v-model:pageCount = "totalPage"/>
  </el-card>
</template>
<style>

</style>
<script>
import {error} from "../../utils/message";
import {loadConfigedMenus, loadDepartments, postRequest, selectMenusTreeData} from "../../api/star_horse";


import {common} from "../../api/common";
import {ref} from "vue";

export default {
  name: "RolesinfoEntity",
  mixins: [common],
  setup() {
    return {}
  },
  data() {
    const loadByPageUrl = ref("/system-config/system/rolesinfoEntity/pageList");
    const mergeUrl = ref("/system-config/system/rolesinfoEntity/merge");
    const mergeDraftUrl = ref("/system-config/system/rolesinfoEntity/mergeDraft");
    const batchMergeUrl = ref("/system-config/system/rolesinfoEntity/mergeBatch");
    const batchMergeDraftUrl = ref("/system-config/system/rolesinfoEntity/mergeBatchDraft");
    const loadByIdUrl = ref("/system-config/system/rolesinfoEntity/getById");
    const deleteUrl = ref("/system-config/system/rolesinfoEntity/batchDeleteById");
    const exportAllUrl = ref("/system-config/system/rolesinfoEntity/exportData");
    const downloadTemplateUrl = ref("/system-config/system/rolesinfoEntity/downloadTemplate");
    const uploadUrl = "/system-config/system/rolesinfoEntity/importData";
    const primaryKey = "idRolesinfo";
    return {
      uploadUrl,
      loadByPageUrl,
      mergeUrl,
      mergeDraftUrl,
      batchMergeUrl,
      batchMergeDraftUrl,
      loadByIdUrl,
      deleteUrl,
      exportAllUrl,
      downloadTemplateUrl,
      primaryKey,
      rules: {
        departments: [{required: true, message: "必选项不能为空", trigger: "blur"}],
        roleName: [{required: true, message: "必选项不能为空", trigger: "blur"}],
        roleCode: [{required: true, message: "必选项不能为空", trigger: "blur"}],
        appsList: [{required: true, message: "必选项不能为空", trigger: "blur"}],
        menusList: [{required: true, message: "必选项不能为空", trigger: "blur"}],
        roleDesc: [{required: false, message: "必选项不能为空", trigger: "blur"}],
      },
      appList: []
    }
  },
  methods: {

    dataFormat(row, column, cellValue, index) {
      cellValue = this.commonDataFormat(row, column, cellValue, index);
      let names = [];
      if (column.property == "departments") {
        row.departments.forEach(item => names.push(item.deptName));
        return names.toLocaleString();
      }
      if (column.property == "menusList") {
        row.menusList.forEach(item => names.push(item.menuName));
        return names.toLocaleString();
      }

      return cellValue;

    },

    /**
     * 初始化数据
     */
    init: function () {
      let _this = this;
      _this.dataList = [];
      _this.selectData = [];
      _this.loadByPage(this.currentPage, this.pageSize);
      _this.loadPermissionResources();
      _this.loadSelectData();
      _this.loadDepartData();
      _this.loadMenus();
      _this.loadApps();

    },
    loadApps() {
      let _this = this;
      let query = [
        {propertyName: "statusCode", value: 1},
        {propertyName: "isDel", value: 0},
      ];
      postRequest("system-config/system/informationsEntity/getAllByCondition/", query).then(res => {
        _this.appList = res.data.data;
      }).catch(err => {
        error(err);
      });

    },
    loadDepartData() {
      let query = [], that = this;
      loadDepartments(query).then(res => {
        that.departList = res;
      }).catch(err => {
        error(err);
      });

    },
    loadMenus() {
      let query = [], that = this;
      loadConfigedMenus(query).then(res => {
        let redata = res.data.data;
        that.menuList = selectMenusTreeData(redata);
        console.log(that.menuList);
      }).catch(err => {
        error(err);
      });

    },

    /**
     * 状态码数据
     */
    loadSelectData() {
      this.commonSelectData("sys_rolesinfo");
    },
    formatDepart: function (data) {
      if (data) {
        let redata = [];
        data.forEach(item => {
          redata.push(item.deptName);
        });
        return redata.toString();
      }
    },

    parseSearchData: function () {
      let data = this.searchForm;
      let arr = [];
      if (data.roleName) {
        arr.push({
          propertyName: "roleName",
          value: data.roleName,
          operation: "lk"
        });
      }
      if (data.createdDate) {
        arr.push({
          propertyName: "createdDate",
          value: data.createdDate,
          operation: "bt"
        });
      }
      return arr;
    }

  }
  ,
  created() {
    this.init();
  }
}
</script>